﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanmia.Core;
using FluentNHibernate.Mapping;

namespace Tanmia.NHibernate.Mapping
{
    public class ItemCategoryMap : ClassMap<ItemCategory>
    {
        public ItemCategoryMap()
        {
            Table("ItemCategory");

            Id(x => x.ItemCategoryID).Not.Nullable().GeneratedBy.Identity();

            Map(x => x.Name).Not.Nullable().Length(128).Unique();
            Map(x => x.CreateDate).Not.Nullable().Not.Update();
            Map(x => x.Note).Nullable().Length(2048);
        }
    }
}
